/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __PQ_MeshData_H__
#define __PQ_MeshData_H__

#include "EnginePrerequisites.h"

//category by functionality
namespace PQEngine
{
	//This class mainly used for accurate selection
	//
	class MeshData
	{
	private:
		int _subMeshCount;

		int _vertexCount;//current loaded entity's vertex count;
		int _indexCount;//current loaded entity's index count;

		int _vertexBufferSize;
		Ogre::Vector3* _vertexBuffer;

		int _indexBufferSize;
		unsigned long *_indexBuffer;

	public:
		MeshData();
		~MeshData();

		void loadMeshEntity(Ogre::Entity *entity,Ogre::Vector3 position, Ogre::Quaternion orientation,Ogre::Vector3 scale);
		void loadMeshEntity(Ogre::Entity *entity,Ogre::Node *node);
		bool intersect(Ogre::Ray ray);
	};
}
#endif
